package com.example.sb.controller;

import com.example.sb.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PROJECT_NAME sb
 * @PACKAGE_NAME com.example.sb.controller
 * @USER junji
 * @CREATE 2021-12-2021/12/10 21:48
 * @DESC
 */
@RestController
@RequestMapping("/redis")
public class RedisController {
    @Autowired
    private RedisUtil redisUtil;

    @GetMapping(value = "/setValue")
    public String setValue(){
        redisUtil.set("001", "hello world！");
        return "执行成功";
    }
}
